New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct highlighting for multiple regexps #1587
Conversation
ivy.el
Outdated
(cl-remove-if | ||
(lambda (regexp-cons) | ||
(null (cdr regexp-cons))) | ||
ivy--old-re)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not
(cl-mapcan (lambda (cell)
(and (cdr cell)
(list (car cell))))
ivy--old-re)
or, at the very least,
(mapcar #'car (cl-remove-if-not #'cdr ivy--old-re))
(Guaranteed 100% untested, mind you.)
swiper.el
Outdated
(cl-remove-if | ||
(lambda (regexp-cons) | ||
(null (cdr regexp-cons))) | ||
regexp-or-regexps)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Fixed, thanks. |
I only looked at them briefly, but I think this pull request solves both of those issues. Namely, all subparts of the search query are highlighted in the minibuffer, without having to update I used both functionalities in |
As did I, hence the lazy question. :)
Happy days! Even if this PR doesn't iron out their every kink, you can probably still mention them in the commit message. |
Fixes abo-abo#654. Fixes abo-abo#1550. Supersedes abo-abo#1551.
c827477
to
b4fac8b
Compare
OK, done :) |
Thanks. |
Fixes #654.
This was a really simple fix. (Only the
let*
forms and thedolist
at the beginning were touched.) So maybe I am missing something?It may also be necessary to adapt
ivy--subexps
to handle a list of integers, so that each regexp in the list may have a different number of subexpressions. That could be doable in a separate commit, depending on how important it is.